<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

		<p:growl id="growl" showDetail="false" globalOnly="true" life="6000" autoUpdate="true" />
		<p:dialog id="panelNewResponsible" header="#{msg.button_add_responsible}" widgetVar="newResponsavelModal" modal="true"
			resizable="false" width="450" closable="false" draggable="false">
			
			<h:form id="formNewResponsavel">
				<p:messages id="msg" globalOnly="false" showDetail="false" autoUpdate="true" closable="true" />
				<h:panelGrid cellpadding="10">
					<p:row>
						<h:outputLabel for="name" value="#{msg.label_responsible}" styleClass="labelsPanelGrid" />
						<p:inputText id="name" maxlength="100" size="60" value="#{responsavelBean.name}"  />
					</p:row>

					<p:row>
						<label class="inlineFieldsPanelGrid"> 
							<h:outputLabel value="#{msg.label_cpf}" styleClass="labelsPanelGrid" /> 
							<p:inputMask maxlength="14" size="20" value="#{responsavelBean.cpf}" mask="999.999.999-99"  />
						</label>
					</p:row>

					<p:row>
						<label class="inlineFieldsPanelGridComboBox"> 
							<p:commandButton
								value="Salvar"
								action="#{responsavelBean.saveResponsible}" 
								icon="ui-icon-disk"
								ajax="true" update=":formShowResponsaveis:tableResponsaveis"
								process="@form" /> 
								
							<p:commandButton value="Cancelar" update="" icon="ui-icon-circle-close" 
								onclick="newResponsavelModal.hide();" action="#{responsavelBean.cleanInputs}" />
						</label>
					</p:row>
					
				</h:panelGrid>
			</h:form>

		</p:dialog>
		
</ui:composition>
